<?php

use yii\db\Migration;

/**
 * Class m171222_081839_add_column_enterprise
 */
class m171222_081839_add_column_enterprise extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
		//$this->addColumn('project', 'rsync_sh', Schema::TYPE_STRING . '(200) DEFAULT "" COMMENT "执行sh脚本名称"');
        $this->addColumn('project','enterprise',$this->smallInteger()->defaultValue(5)->comment('企业'));//1.国有企业 2.国有参股 3.民营企业 4.上市公司 5.其他
		$this->addColumn('project_payment_collection','project_id',$this->bigInteger()->notNull());//项目id
	}

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        echo "m171222_081839_add_column_enterprise cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m171222_081839_add_column_enterprise cannot be reverted.\n";

        return false;
    }
    */
}
